<template>
<view class="not-promise-box flex flex-column justify-center align-center">
  <image class="not-promise-png" :src="notPromisePng"></image>
  <view class="not-promise-text mt20">暂无权限，请联系管理员</view>
  <view class="not-promise-btn mt20">
    <d-button @click="btnFn">{{ btnText }}</d-button>
  </view>
</view>
</template>

<script setup lang="ts">
import notPromisePng from '@/static/images/not-promise.png'
import {useRouteHistoryStore} from "@/stores/routeHistory";

defineOptions({ name: 'NotPromise' })

const props = defineProps({
  btnText: {
    type: String,
    default: '返回',
  }
})

const $emit = defineEmits(['notDataFn'])

function btnFn() {
  useRouteHistoryStore().routeGoBack();
}
</script>

<style scoped lang="scss">
.not-promise-box {
  width: 100%;
  height: 100%;

  .not-promise-png {
    width: 434rpx;
    height: 400rpx;
  }

  .not-promise-text {
    color: #969799;
  }

  .not-promise-btn {
    width: 100%;
    max-width: 400rpx;
  }
}
</style>
